import config from "@/utils/config.js"
//绑定业务员
const bindUser = async (bindUserId, stationId, token) => {
	let url = config.baseUrl + "wx/busi/setuserworkgroup";
	let param = {
		token: token,
		bindUserId: bindUserId,
		stationId: stationId
	}
	let res = await config.getData(url, param);
	return res;
}

//加载绑定和未绑定的业务员：0 绑定 1 未绑定
const getBindUser = async (stationId, getType, token) => {
	let url = config.baseUrl + "wx/busi/userworkgroup";
	let param = {
		token: token,
		getType: getType,
		stationId: stationId
	}
	let res = await config.getData(url, param);
	return res;
}

//根据手机号获取个人信息数据
const getUserByPhone = async (tel) => {
	let url = config.baseUrl + "wx/user/getuserbyphone";
	let param = {
		phone: tel
	}
	let res = await config.getData(url, param);
	return res;
}

export default {
	bindUser,
	getBindUser,
	getUserByPhone
}